﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TweetSharp.Twitter.Fluent
{
    public static partial class Extensions
    {
        /// <summary>
        /// Requests only statuses posted after the status with a specific id
        /// </summary>
        /// <param name="instance"></param>
        /// <param name="id">ID of a status that is the lower limit for requested statuses</param>
        /// <returns></returns>
        public static ITwitterCommentsByMe Since(this ITwitterCommentsByMe instance, int id)
        {
            instance.Root.Parameters.SinceId = id;
            return instance;
        }
        /// <summary>
        /// Requests only statuses posted after the status with a specific id
        /// </summary>
        /// <param name="instance"></param>
        /// <param name="id">ID of a status that is the lower limit for requested statuses</param>
        /// <returns></returns>
        public static ITwitterCommentsByMe Since(this ITwitterCommentsByMe instance, long id)
        {
            instance.Root.Parameters.SinceId = id;
            return instance;
        }
        /// <summary>
        /// Requests only statuses posted before the status with a specific id
        /// </summary>
        /// <param name="instance"></param>
        /// <param name="id">ID of a status that is the upper limit for requested statuses</param>
        /// <returns></returns>
        public static ITwitterCommentsByMe Before(this ITwitterCommentsByMe instance, int id)
        {
            instance.Root.Parameters.MaxId = id;
            return instance;
        }
        /// <summary>
        /// Requests only statuses posted before the status with a specific id
        /// </summary>
        /// <param name="instance"></param>
        /// <param name="id">ID of a status that is the upper limit for requested statuses</param>
        /// <returns></returns>
        public static ITwitterCommentsByMe Before(this ITwitterCommentsByMe instance, long id)
        {
            instance.Root.Parameters.MaxId = id;
            return instance;
        }
        /// <summary>
        /// Requests a specific page of comment when paging
        /// </summary>
        /// <param name="instance"></param>
        /// <param name="page">1-based page number</param>
        /// <returns></returns>
        public static ITwitterCommentsByMe Skip(this ITwitterCommentsByMe instance, int page)
        {
            instance.Root.Parameters.Page = page;
            return instance;
        }

        /// <summary>
        /// Requests a specific number of statuses per page 
        /// </summary>
        /// <remarks>
        ///  See http://apiwiki.t.sina.com.cn/Things-Every-Developer-Should-Know#6Therearepaginationlimits the twitter api documentation for pagination limits
        /// </remarks>
        /// <param name="instance"></param>
        /// <param name="count">Number of statuses per page to request</param>
        /// <returns></returns>
        public static ITwitterCommentsByMe Take(this ITwitterCommentsByMe instance, int count)
        {
            instance.Root.Parameters.Count = count;
            return instance;
        }
	}
}
